package model;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Observable;
import java.util.Observer;

public class Trail extends Observable{	

	public AbstractPen myPen; //defines visual aspects of path
	public ArrayList<Point> myPath;
	private Model myModel; 

	private static ArrayList<Observer> observerList;
	
	public Trail(AbstractPen pen) {
		myPen = pen;
		myPath = new ArrayList<Point>();
	}
	
	public Collection<Point> getPathCoordinates()
	{
		return myPath;
	}
	
	public void notifyObservers() {
		myModel.notifyObservers("trail");
	}

	public void addModelObserver(Model model) {
		myModel = model;
	}

	public void addCoord(Point current) {
		myPath.add(current);
		
		System.out.println("Current trail");
		for(int i = 0; i < myPath.size(); i++){
			System.out.println("Point "+i+" = "+myPath.get(i).toString());
		}
		
	}

}
